import request from "@/utils/request";

export function page(data) {
  return request({
    url: "/v1/task/page",
    method: "get",
    params: data
  });
}

export function save(data) {
  return request({
    url: "/v1/task/save",
    method: "post",
    data: data
  });
}

export function deleteById(id) {
  return request({
    url: "/v1/task/delete/" + id,
    method: "get"
  });
}

export function update(data) {
  return request({
    url: "/v1/task/update",
    method: "post",
    data: data
  });
}

export function commandIssue(id) {
  return request({
    url: "/v1/task/commandIssue/" + id,
    method: "get"
  });
}

export function getById(id) {
  return request({
    url: "/v1/task/get/" + id,
    method: "get"
  });
}

export function pageDownRecord(params) {
  return request({
    url: "/v1/task/pageDownRecord/",
    method: "get",
    params
  });
}

export function updateStatistics(params) {
  return request({
    url: "/v1/down-record/updateStatistics",
    method: "get",
    params
  });
}
